import java.io.*;
public class Main {

    public static void main(String[] args) throws IOException {
        Integer i = 1;
        Double h = 0.0;
        Integer r = 0;
        String[] pos;
        BufferedReader   br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while (true)
        {
            line = br.readLine();
            if (line.equals("0 0")){
            break;
            }
            else
            {
            pos = line.split(" ");
            h = (Math.hypot(Integer.parseInt(pos[0]), Integer.parseInt(pos[1]) ) );
            h = Math.ceil(h);
            r = h.intValue();
            System.out.println("Caso #"+i.toString()+": "+r.toString());
            i = i+1;
            }
        }
    }
}
